home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / prin28.arc / PRIN28.DOC < prev    next >
Text File  |  1990-08-02  |  11KB  |  278 lines

  1.                                    PRIN
  2.                                 Version 2.8
  3.                       Copyright (C) Drake Koefoed 1990
  4.  
  5.  
  6.  
  7. By use of this program, you agree to hold the author free from any
  8. liability of any kind.
  9.  
  10.  
  11.  
  12. HOW TO USE PRIN
  13. ===============
  14.  
  15. PRIN is called up by the command
  16.  
  17.         PRIN filename [options]
  18.  
  19. where (filename) is the name of a file.  If no filename or options are
  20. specified, you get a help screen.  Otherwise, PRIN will print the
  21. contents of the file named, at 60 lines per page (unless you specify
  22. another page size with the /l parameter, explained below)  Unless you
  23. use the /n parameter (explained below), PRIN will print the filename
  24. in all caps at the top of the first page.
  25.  
  26. You may abort what's printing at any time by pressing escape.  PRIN
  27. will discontinue printing the file, but bear in mind that there are
  28. two factors to consider:
  29.  
  30. *  Your printer may have a substantial buffer, which is usually full
  31.    because PRIN runs much faster than a printer.  The printer will
  32.    continue to print what's in that buffer, even after PRIN has been
  33.    aborted, though PRIN will return to the DOS prompt.
  34.  
  35. *  PRIN checks for an escape before sending each line;  DOS suspends
  36.    PRIN while the printer empties enough of its buffer to accept
  37.    another line; only when PRIN has control back will it abort the
  38.    printing.
  39.  
  40. While we're speaking of aborts, it helps to turn the printer on before
  41. you start printing, but you don't have to.  If it's off, you will get
  42. the nasty message from DOS: "Error writing device PRN.  Abort, Retry,
  43. Fail, Ignore?". Just turn the printer on and hit r.  It will print as
  44. if nothing had happened.  I do this a lot because I turn my printers
  45. off when something goes wrong, and when you're testing a printing
  46. program, that is not uncommon.
  47.  
  48. In answer to the obvious(?) question, no, I can't test if PRN is on. I
  49. could test to see if LPT 1 was on, but you can use the MODE command to
  50. redirect PRN to another port, in which I would be testing the wrong
  51. device.  If this doesn't make any sense to you, don't worry, you don't
  52. need to know it.
  53.  
  54. PRIN filters out all form-feeds  embedded in the file, so it totally
  55. ignores the existing pagination of the file.  This is handy when
  56. printing out shareware documents that have wierd page lengths, useless
  57. formfeeds, or no pagination at all.
  58.  
  59. PRIN sends an Escape-@  to the printer on startup, (unless you use the
  60. i option, explained below), which is a RESET to an Epson and many
  61. others.   Some printers, however, may not understand this code, in
  62. which case they will not reset.
  63.  
  64. PRIN depends on you to set the paper to the TOP OF FORM before
  65. starting.  60 (or whatever is set by the /l parameter) lines will be
  66. printed, and then a formfeed.   When the end of file is reached,
  67. another formfeed will be sent to eject the last page, and PRIN will
  68. exit.
  69.  
  70. COMMAND LINE OPTIONS
  71. ====================
  72. All switches are lowercase; uppercase are being reserved for future
  73. options, for instance, P will be filename on each page as well as a
  74. number, and M will be force a margin even if I have to wrap to do it.
  75.  
  76. Spaces or forward slashes will have the same effect.  Programmers refer
  77. to these things as delimiters, because they mark the limits of the
  78. filename and the command line parameters.  If you use some that are not
  79. needed, you will get a period on the screen as each is found.  Your
  80. printout is not affected.  This is just to tell you you don't need to
  81. type so much.
  82.  
  83. NO FILENAME AT TOP OF FIRST PAGE: n
  84. -----------------------------------
  85. The n option prevents the filename from being printed.  You can say
  86.  
  87.         PRIN myfile/n
  88. or
  89.         PRIN myfile n
  90.  
  91. Either will stop the filename from being printed.
  92.  
  93. OMIT DATE AND TIME FROM FILENAME: o
  94. -----------------------------------
  95. The o option prevents the date and time of the file from being printed.
  96. If the filename is not printed, then the date and time are automatically
  97. left off.
  98.  
  99.  
  100. LINES PER PAGE: l
  101. -----------------
  102. The l option sets the number of lines to the number following.
  103. For example:
  104.  
  105.         PRIN filename l55
  106.  
  107. would cause PRIN to print out the file called filename at 55 lines per
  108. page. This number must be two digits.  ( use 05 for 5 lines per page.)
  109.  
  110. PAGE NUMBERING: p
  111. -----------------
  112. The p option numbers the pages in the upper right.
  113.  
  114. MARGIN AT LEFT: m
  115. -----------------
  116. The m option adds a left margin of five characters
  117. unless the line is too long.  I add a margin to any line that will fit
  118. on the page with one.  If it won't I print that line without a margin.
  119. Using the default linelength, you will get margins if your lines are
  120. not over 75 characters.  This feature keeps your printout away from
  121. the area that hole punches punch in.
  122.  
  123. RIGHT MARGIN: rxx or rxxx
  124. -------------------------
  125. (where xx or xxx is a number between 10 and 256.)
  126. r is the maximum line length.  The default is 80.  the r parameter
  127. sets the point at which PRIN will wrap.  I wrap at the last space
  128. before that.  I back up half the line length looking for a space
  129. before I give up and call a procedure called "dumbwrap" that cuts the
  130. "word" at the edge of the print area.  Since
  131. "antidisestablishmentarianism" is well under 40 characters, you will
  132. probably not see "dumbwrap" at work unless you try to print out some
  133. graphics boxes and use too narrow a margin.  The default wrap point is
  134. the last space before 80 characters. This option is not a substitute
  135. for a word processor.  It wraps those lines that do not fit, but
  136. starts the next line at the beginning.  It is intended primarily to
  137. protect the occasional long line in program source code from being
  138. chopped off on printing, or printing off the edge of the paper.
  139.  
  140. INITIALIZATION OFF: i
  141. ---------------------
  142. You may want to use a batch file that sends a file to the printer with
  143. copy or some program to set your printer to near letter quality or
  144. whatever.  If you do, this option prevents PRIN from sending the reset
  145. and wiping out what is in the printer's memory.  This means PRIN will
  146. use whatever font, top of form, etc. the printer is currently set to.
  147.  
  148. DOUBLESPACE: d
  149. --------------
  150. Prints blank lines between the lines in the original file.  Handy for
  151. creating a scratch copy of a file without changing the file itself,
  152. especially if you're writing the file with an editor that does not do
  153. doublespace.
  154.  
  155. PRINT TO FILE: f
  156. ----------------
  157. Prints the output to a file.  This file may be printed later with the
  158. copy command.  This lets you use prin to generate such things as
  159. shareware doc files on discs with embedded formfeeds and page numbers.
  160. Normally you would not use prin to print this output file, because
  161. prin would just filter the formfeeds back out again.  Prin outputs a
  162. line at a time, which is reasonable for a printer, but not very
  163. efficient for writing to files.  Large documents are best handled by
  164. writing to a ram disc and then copying.
  165.  
  166. SET TABSIZE: b
  167. --------------
  168. Sets the tabsize to a single nonzero digit, 1 to 9.
  169.  
  170. for example:
  171.  
  172.         PRIN filename b5
  173.  
  174. would cause prin to space over to the next column that is a multiple of 5
  175. each time a tab is encontered.  Default is 8, which is the same as DOS print
  176. uses.
  177.  
  178.  
  179. CAPITAL LETTER OPTIONS:
  180. -----------------------
  181.  
  182. CLONE: C
  183. --------
  184. Clones the program to the current settings.  The file to be cloned must
  185. be named prin.com, and it must be in the current directory.  Once
  186. cloned, the program may be named anything you wish provided you keep
  187. the extension .com.  This may be useful for creating one copy that prints
  188. doublespace, one that prints with no filename, etc, so you can avoid typing
  189. any parameters at all.
  190.  
  191. KLONE: K
  192. --------
  193. Klones the program to the defaults.  the file to be cloned must be
  194. named prin.com, must be in the current directory.  You must give a
  195. filename, but if you do not want to print something with the current
  196. settings, the file you name should be nonexistant.  Klone will take
  197. effect, and then prin will try to open the nonexistant file to print
  198. out, and exit with the file not found error message.  Klone affects the
  199. file on disc, not what is in memory.
  200.  
  201. EXAMPLE:
  202. --------
  203.         prin nonesuch K
  204.  
  205. This would Klone the program to the defaults, and then look for
  206. nonesuch to be printed with the existing settings.  Since nonesuch does
  207. not exist, nothing will be printed with the settings in memory (the
  208. old ones), and prin will exit, having changed the program on disc to
  209. the default settings.  The next time PRIN is called, the default settings
  210. will be in effect.
  211.  
  212. EXAMPLES
  213. ========
  214.  
  215.         prin prin25.doc
  216.  
  217. This would print PRIN25.DOC at 60 lines per page, with the filename at
  218. the top of the first page.
  219.  
  220.          prin prin25.doc l58 n m p
  221.  
  222. This will print PRIN25.DOC at 58 lines per page *without* the filename
  223. at the top, and add a margin of five spaces at the left, number the
  224. pages.
  225.  
  226.  
  227. PRIN is written in ASSEMBLER, so it is very small and fast.  I have run
  228. {COMMO} in one window of Desqview and PRIN in another with no
  229. noticable slowing of print speed on an 8mhz XT.  PRIN and PRINS.BAT
  230. can run in a 7k window under Desqview.  You will find PRIN works much
  231. better than the DOS print in this situation, because it uses much less
  232. CPU time.Also, PRIN is NOT memory resident.
  233.  
  234.  
  235. ERROR CODES
  236. ===========
  237. On errors, I save the DOS error code and return it on termination, so
  238. you can find out what went wrong if you want.  On successful termination,
  239. I return an errcode of zero.  My own errcodes start at 96. (60h). Have
  240. fun, batch freaks!
  241.  
  242.  
  243. I NEED TESTERS!
  244. ===============
  245. If you print things PRIN is good for, I would like to have you run the
  246. latest versions of the program.
  247.  
  248. The best way to leave me a message about the program would be on:
  249.  
  250.      Gravesend                 (707) 795 4939
  251.      Directory Assistance      (707) 538-8710
  252.      CC&C                      (707) 584 3441
  253.      VOR                       (707) 778 8944
  254.      Motherboard               (707) 778 8743
  255.  
  256. REGISTRATION: Now here is my favorite part: If you use prin, and it
  257. works for you, the right thing to do is to pay for it.  Please send a
  258. self addressed stamped envelope and $5 to the address below.  The
  259. envelope will be used to send you a password and instructions for
  260. converting PRIN to the registered version.
  261.  
  262. PRICING: Prin is priced considerably lower than most comparable
  263. programs.  This reflects a view of shareware that it should be less
  264. expensive than commercial software even when it's better.  If users
  265. enthusiastically upload it, and encourage others to register, I think
  266. I will eventually be paid reasonably for the work I have done.
  267.  
  268.  
  269. Drake Koefoed                    After Sept '90 I will be at
  270. 8120 Tarwater road                 1409 Oakpatch road # A 9
  271. Santa Rosa, CA 95404                Eugene Oregon 97402
  272.  
  273.  
  274. LAURELS AND LEGALESE
  275. ====================
  276. Desqview is the property of Quarterdeck. It's a great program.
  277. {Commo} is the property of Fred Brucker.  It's a greater program.
  278.